package com.ruoyi.server.api.readcard.controller;
import com.ruoyi.server.api.readcard.service.ReadCardService;
import com.ruoyi.server.api.readcard.entity.Card;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;



/**
 * @ClassName controller
 * @Description TODO
 * @Author 17179
 * @Date 2024/6/5 9:53
 **/
@RestController
@RequestMapping("/liven/readCard")
public class ReadCardController {


    @Autowired
    ReadCardService readCardService;
    /**
     * 接收读卡器读卡时数据
     * @param card 接收读卡消息的实体
     * @return
     */
    @PostMapping
    public void receiveMsg(@RequestBody Card card){
        readCardService.receiveMsg(card);
    }
}
